package com.hodi.myfirstapp

import android.content.Intent
import android.net.Uri
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.util.Log
import android.view.View

class MainActivity4 : AppCompatActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main4)
        intent.putExtra("name", "dog")
        val s = intent.getStringExtra("name2")
        Log.i("MainActivity4", s ?: "")
        setResult(RESULT_OK, intent)
        Log.i("MainActivity4", "tes2t")
    }

    fun toBs(view: View) {
        val intent = Intent(Intent.ACTION_VIEW)
        intent.data = Uri.parse("https://www.bing.com")
        startActivity(intent)
    }
}